// https://iai.sh.cn/problem/58
#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  int ans = 0;
  for (int i = 5; i <= n; i = 5 * i) {
    ans += n / i;
  }
  cout << ans;

  return 0;
}